<template>
  <el-dialog
    title="其它产品信息"
    :visible.sync="dialogVisible"
    width="500px"
  >
    <el-form
      :inline="false"
      :model="detailData"
      ref="updateForm"
      label-width="150px"
    >
      <el-form-item label="安装包升级数：">
        {{ (detailData.packageSucceedCount ? detailData.packageSucceedCount : 0) + ' - ' + (detailData.packageUpgradeCount ? detailData.packageUpgradeCount : 0) + ' / ' + (detailData.upgradeTotalCount) }}
      </el-form-item>
      <el-form-item label="产品参数升级数：">
        {{ (detailData.settingSucceedCount ? detailData.settingSucceedCount : 0) + ' - ' + (detailData.settingUpgradeCount ? detailData.settingUpgradeCount : 0) + ' / ' + ( detailData.upgradeTotalCount) }}
      </el-form-item>
      <el-form-item label="IMSI: ">{{ detailData.imsi }}</el-form-item>
      <el-form-item label="位置: ">{{ detailData.location }}</el-form-item>
      <el-form-item label="创建时间: ">{{ detailData.createdAt }}</el-form-item>
      <el-form-item label="更新时间: ">{{ detailData.updatedAt }}</el-form-item>
    </el-form>
  </el-dialog>
</template>

<script>
import { Message } from 'element-ui';
import { parseError } from '../../../utils';
import { MomentFormat, SortType } from '../../../constants/common';
export default {
  data() {
    return {
      dialogVisible: false,
      detailData: {}
    };
  },
  methods: {
    showDialog(row) {
      this.dialogVisible = true;
      Object.assign(this.detailData, {
        createdAt: row.createdAt,
        updatedAt: row.updatedAt,
        imsi: row.imsi,
        location: row.location,
        packageSucceedCount: row.packageSucceedCount,
        packageUpgradeCount: row.packageUpgradeCount,
        settingSucceedCount: row.settingSucceedCount,
        settingUpgradeCount: row.settingUpgradeCount,
        upgradeTotalCount: row.upgradeTotalCount
      });
    }
  }
};
</script>

<style lang="scss" scoped>
</style>
